<include file="../header" />
<body class="J_scroll_fixed">
<script>


</script>
<form class="well form-search" method="post" style="float:left" action="{:U('messagebox/index')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
            状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：{:getEnumSelectWidget($statusEnum, "mb#status", $status, 1)}
            &nbsp;用户名称：<input type="text" name="cus#nickname-like" value="{$nickname}" />
            产品名称：<select name="mb#product_id"><option value="">请选择</option>{:getProductSelectOptionHtml(0, 0)}</select>
            <br>开始时间：<input type="text" value="{$begin_time}" class="date J_date" name="mb#create_time-egt" />
            截止时间：<input type="text" value="{$end_time}" class="date J_date" name="mb#create_time-elt" />
            <button class="btn btn-primary" type="submit">搜索</button>
            <a class="btn" href="{:U('messagebox/index')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>订单号</th>
            <th>用户信息</th>
            <th>医生医院</th>
            <th>留言内容</th>
            <th>产品名称</th>
            <th>创建时间</th>
            <th>状态</th>
            <!--th>操作</th-->
        </tr>
        </thead>
        <tbody>
        <foreach name="messageboxList" item="vo">
            <tr>
                <td>{$vo.messagebox_id}<br>{$vo.out_trade_no}</td>
                <td>姓名：{$vo.nickname}<br>电话：{$vo.number}</td>
                <td>医生：{$vo.doctor_name}<br>医院：{$vo.hospital_name}</td>
                <td>{$vo.message_content}</td>
                <td>{$vo.product_name}, 数量：{$vo.count}<br>
                    <if condition="$vo.count gt 0">
                        <a class="btn btn-info"
                           href='{:U("messagebox/viewOrder",array("customer_id"=>$vo["customer_id"],"product_id"=>$vo["product_id"],"category_id"=>$vo["category_id"]))}'>查看订单</a>
                    </if>
                </td>
                <td>{$vo.create_time}</td>
                <td>{:getEnumString($statusEnum, $vo['status'])}<br>{$vo['notified']}</td>
                <!--td>
                    <a class="btn btn-success"
                       href='{:U("messagebox/viewnotify",array("id"=>$vo["messagebox_id"],"name"=>$vo["nickname"],"doctor"=>$vo["doctor_name"],"hospital"=>$vo["hospital_name"],"product"=>$vo["product_name"],"count"=>$vo["count"]))}'>通知销售</a>
                </td-->
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>